package cn.kgc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import java.io.Serializable;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "industry")
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@SuppressWarnings("all")
public class Industry extends Model<Industry> implements Serializable {

    /**
     * 主键 行业ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 行业名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 为0则当前为第一级分类，否则当前为fatherId所对应行业的子分类
     */
    @TableField(value = "father_id")
    private String fatherId;

    /**
     * 用于提供给前端tree显示标记是否展示下拉箭头。一级和二级分类都为0，三级分类为1
     */
    @TableField(value = "is_leaf")
    private Short isLeaf;

    /**
     * 分类层级，用于标记
     */
    @TableField(value = "level")
    private Integer level;

}
